package com.spring.ext.demos.ext.aop;


import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

import java.lang.reflect.Method;

public class LogInterceptor implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        System.out.println("调用方法前");
        Object proceed = invocation.proceed();
        System.out.println("调用方法后");
        return proceed;
    }
}
